package com.bootdo.lvyou_specialty.dao;

import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyProductArticle;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-10 11:41:31
 */
@Mapper
public interface LvyouSpecialtyProductArticleDao {

	LvyouSpecialtyProductArticle get(Long id);
	
	List<LvyouSpecialtyProductArticle> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(LvyouSpecialtyProductArticle lvyouSpecialtyProductArticle);
	
	int update(LvyouSpecialtyProductArticle lvyouSpecialtyProductArticle);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	@Select("select lspa.id, lspa.title, lspa.image from me_lvyou_specialty_product_article lspa where is_show = 1 and type_id = #{typeId} limit #{offset}, #{limit}")
	List<LvyouSpecialtyProductArticle> getByTypeId(Map<String, Object> param);
}
